{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Kanerva's Table 7.3 (page 70)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import sdm as sdmlib\n",
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "bits = 1000\n",
    "sample = 1000000\n",
    "radius = 451\n",
    "scanner_type = sdmlib.SDM_SCANNER_OPENCL"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "address_space = sdmlib.AddressSpace.init_from_b64_file('sdm-10000w.as')\n",
    "counter = sdmlib.Counter.load_file('sdm-10000w')\n",
    "sdm = sdmlib.SDM(address_space, counter, radius, scanner_type)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "b = sdmlib.Bitstring.init_random(1000)\n",
    "sdm.write(b, b)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Distance: 1000 (100.00%)\n",
      "Done!\n"
     ]
    }
   ],
   "source": [
    "from IPython.display import clear_output\n",
    "\n",
    "distances = []\n",
    "x = range(0, 1001)\n",
    "for i, dist in enumerate(x):\n",
    "    clear_output(wait=True)\n",
    "    print 'Distance: {:4d} ({:.2f}%)'.format(dist, 100.*(i+1)/len(x))\n",
    "    c = sdmlib.Bitstring.init_from_bitstring(b)\n",
    "    c.flip_random_bits(dist)\n",
    "    assert c.distance_to(b) == dist\n",
    "    d = sdm.iter_read(c, max_iter=1)\n",
    "    distances.append(d.distance_to(b))\n",
    "print 'Done!'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhE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RZMEukOJ4jiuteoDz4Fvaoj/wb/t4hH3fCvZzdiILwp2GKLFafq9/GzjfPm6KrLaoKBEhNdoDUJQIUZpy4xcAV9rHc4A9AV5zHmIx7LLb72GKLLpZgXzJf4Sp8Ay+hQSbAO8jVV0rYha5soDZwBH7OTvsay62r99tX7fX3v8F30Kn1YAqwMEA41IUT9GYiZIsrEIK17mpjvyCXx/g+pKqxlp+1/hf77QvBcYh5eCXIJaFP2MRq6YNEryv7Dp32HV8FPkB6P9s9zPPQxZMOwtRUqpIlIigykRJFhYgv9KdWVblkdX4JgF/+F37BXCjfdwdWf7Vn++QWVm1EDfUtRgLJ8W1bwpkI2W/ayBB/zzEanCojlR5BZkV5hBIYVhAlv08x83ljG8e4s5zaBvg9YoSFlSZKMnElciX8Fok5nAQKb8NvqvP/RO4EAnAX4nERvzZisQ0vkHiGitd55x7lUdmda1AYjNjgN+R2MyVmAD8CGAq8D2y9K7ldx9/ViGz0D5HAvDP2v2DkYWhltvjub1oUSiKoiiKoiiKoiiKoiiKoiiKoiiKoiiKoiiKoiiKoiiKoiiKoiiKoiiKoihKDPL/AYK3iDujd3b2AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x10a0bd750>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure()\n",
    "plt.plot(x, distances)\n",
    "plt.plot(x, x, 'k')\n",
    "plt.plot(x, [500]*len(x), 'k:')\n",
    "plt.title('Kanerva\\'s Figure 7.3')\n",
    "plt.ylabel('New distance (after one read)')\n",
    "plt.xlabel('Old distance')\n",
    "plt.grid()\n",
    "plt.axis([0, 1000, 0, 1000]);"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0 1000\n",
      "1 765\n",
      "2 682\n",
      "3 570\n",
      "4 512\n",
      "5 519\n",
      "6 509\n",
      "7 498\n",
      "8 506\n",
      "9 481\n",
      "10 489\n"
     ]
    }
   ],
   "source": [
    "c = sdmlib.Bitstring.init_from_bitstring(b)\n",
    "c.flip_random_bits(1000)\n",
    "d = c\n",
    "print 0, b.distance_to(d)\n",
    "for i in xrange(10):\n",
    "    d = sdm.read(d)\n",
    "    print i+1, b.distance_to(d)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
